from django.db import models

# Create your models here.
class Question(models.Model):
    QTYPE = (('0','填空题'),('1','单选题'),('2','判断题'),('3','论述题'))
    # 题目标识
    title = models.CharField(max_length=255,null=False,unique=True)
    #题目类型
    qtype = models.CharField(max_length=1,choices=QTYPE)
    #选项1-4
    option1 = models.CharField(max_length=255)
    option2 = models.CharField(max_length=255)
    option3 = models.CharField(max_length=255)
    option4 = models.CharField(max_length=255)

    # 参考答案
    ref_answer = models.CharField(max_length=255)
    # 解析
    analysis = models.TextField(null=False,default='')
    #数据创建时间
    create_time = models.DateTimeField(auto_now_add=True)
    #数据修改时间
    upadte_time = models.DateTimeField(auto_now=True)


















